Skip to content

feat: add custom prompts support#28

Merged
Dimillian merged 7 commits intoDimillian:mainfrom
Afur:feat/custom-prompts-support
Jan 14, 2026
Merged

feat: add custom prompts support#28
Dimillian merged 7 commits intoDimillian:mainfrom
Afur:feat/custom-prompts-support

Conversation

@Afur
Copy link
Contributor

@Afur Afur commented Jan 14, 2026

Summary

  • Adds support for Codex CLI custom prompts inside CodexMonitor.
  • Typing "/" now suggests available custom prompts (from ~/.codex/prompts) with descriptions and argument hints.
  • Selecting a prompt inserts /prompts:<name> with argument placeholders and Tab navigation between args.
  • Handles prompt expansion (named and positional) before sending, matching Codex CLI behavior.
  • Improves file mention insertion inside prompt args and normalizes smart quotes for parsing.

Details

  • Backend: new prompts_list Tauri command reads $CODEX_HOME/prompts (default ~/.codex/prompts), parses front matter, and returns prompt metadata.
  • Frontend: new hook for prompt discovery, autocomplete trigger for /, and UI rendering for hints.
  • Composer: Tab jumps between argument placeholders; @file inside an arg inserts without breaking parsing.
  • Prompt expansion + validation are applied before turn start; invalid args block send with a user-facing error.

Demo

Screen.Recording.2026-01-14.mov

How to test

  1. Create a prompt file in ~/.codex/prompts/example.md with front matter:
    ---
    description: Example prompt
    argument-hint: TITLE= DETAIL=
    ---
    Title: $TITLE
    Detail: $DETAIL
    
  2. In the app, type / and confirm prompts:example appears with description + hint.
  3. Select it; verify /prompts:example TITLE="" DETAIL="" inserts and Tab cycles through values.
  4. Use @ inside an arg (e.g., DETAIL="See @README.md"), select a file, and confirm it inserts without replacing other text.
  5. Send the prompt and verify expansion works; missing args should show a validation error and no turn starts.

Notes

  • Custom prompts are loaded from Codex CLI config; app-server does not expose prompts, so listing happens client-side.
  • README updated to mention /prompts:... autocomplete.

@Dimillian Dimillian merged commit dc30b9e into Dimillian:main Jan 14, 2026
gersmann pushed a commit to gersmann/codex-monitor-web that referenced this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants